<%@page import="com.cb.web.wasf.sample.web.MenuEventHandler" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@taglib uri="http://wasf.cb.com/tag" prefix="wasf" %>
<%@page pageEncoding="UTF-8" %>
<wasf:useTemplate name="common.jsp">
    <wasf:defineFragment name="title"><wasf:insertFrament name="title"/></wasf:defineFragment>
    <wasf:defineFragment name="head">
        <script>
            var mainLayout;
            $(document).ready(function () {
                $("#menu").accordion( { collapsible: true, autoHeight: false } );
                mainLayout = $("body").layout({ resizable: false });
            });
        </script>
        <wasf:insertFrament name="head"/>
    </wasf:defineFragment>
    <wasf:defineFragment name="body">
        <div class="ui-layout-center" style="overflow: auto">
            <wasf:insertFrament name="body"/>
        </div>
        <div class="ui-layout-north">
            Wasf banner !
        </div>
        <div class="ui-layout-south">
            <a href="http://code.google.com/p/wasf" target="_blank">Project home page</a>
        </div>
        <div id="centerContainer" class="ui-layout-west">
            <wasf:form id="menuForm">
                <div id="menu">
                    <h3><a href="#">Administration</a></h3>
                    <div>
                        <wasf:hasRole role="USER_ADMINISTRATION">
                            <div><wasf:submitLink event="menuClick" id="<%= MenuEventHandler.USER_ADMINISTRATION%>">Gestion des utilisateurs</wasf:submitLink></div>
                        </wasf:hasRole>
                        <div><wasf:submitLink event="menuClick" id="<%= MenuEventHandler.CARD%>">Mon pannier</wasf:submitLink></div>
                        </div>
                        <h3><a href="#">Statistiques</a></h3>
                        <div>
                            <div><wasf:submitLink event="oneMorePineapple">A stat</wasf:submitLink></div>
                        <div><wasf:submitLink event="oneMorePineapple">An other stat</wasf:submitLink></div>
                        <div><wasf:submitLink event="oneMorePineapple">An other other stat</wasf:submitLink></div>
                        </div>
                        <h3><wasf:submitLink event="menuClick" id="<%= MenuEventHandler.LOGOUT%>">Déconnexion</wasf:submitLink></h3>
                    </div>
            </wasf:form>
        </div>
    </wasf:defineFragment>
</wasf:useTemplate>